/* ****************************************************************************
 * @用例ID: 20220418-230037-838974137
 * @用例名称: test_c_testcase
 * @用例级别: 3
 * @用例标签:
 * @用例类型: 功能
 * ***************************************************************************/

#include "main.h"
#include <ncurses.h>

int tc_setup(int argc, char **argv) {
    msg("this is tc_setup");
    return 0;
}

int do_test(int argc, char **argv) {
    msg("this is do_test");
    // @测试步骤:1: 初始化要打印的信息
    initscr();
    raw();
    noecho();
    curs_set(0);
 
    char* c = "Hello, World!";
    // @预期结果:1: 返回的字符数不为0，证明成功打印，证明ncurses成功运行
    assert_true(mvprintw(LINES/2,(COLS-strlen(c))/2,c)!=0);
    refresh();
 
    getch();
    endwin();

    return 0;
}

int tc_teardown(int argc, char **argv) {
    msg("this is tc_teardown");
    return 0;
}
